import Foundation
import Moya


  
  
  func uploadImage(image: UIImage, policy: String, accessKeyId: String, signature: String, dir: String, host: String, expire: String,completion: @escaping () -> Void) {
      oss_Provider.request(.uploadImage(image: image, policy: policy, accessKeyId: accessKeyId, signature: signature, dir: dir, host: host, expire: expire)) { result in
      switch result {
      case let .success(response):
        //上传成功
        print(response)
        completion()
      case let .failure(error):
        //上传失败
        print(error)
      }
    }
  }

